package com.example.project.dao;

import com.example.project.entity.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface AggregationInterface {


    List<Aggregation> aggregationtable(@Param("aggregation")Aggregation aggregation,@Param("params") RequestInto params);

    long queryTableCount(@Param("aggregation")Aggregation aggregation,@Param("params") RequestInto params);

    List<User> getadmin();

    long adminCount();

    void addprodectorder(Aggregation aggregation);
//出库表单
    List<Aggregation> outboundtable( @Param("id")String id, @Param("params")RequestInto params);

    long queryoutboundTableCount(@Param("id")String id, @Param("params") RequestInto params);

    void deloutbound(@Param("id")String id);

    void editoutbound(Aggregation aggregation);
    //入库表单
    List<Aggregation> warehousingtable(@Param("id")String id, @Param("params")RequestInto params);

    long querywarehousingTableCount(@Param("id")String id, @Param("params")RequestInto params);

    void delwarehousing(String id);

    void editwarehousing(Aggregation aggregation);

    //单据审核
//单据表单
    List<Aggregation> documenttable(@Param("aggregation")Aggregation aggregation, @Param("params")RequestInto params);

    long querydocumentTableCount(@Param("aggregation")Aggregation aggregation, @Param("params")RequestInto params);
    //通过入库单
    long querytypeidCount(@Param("aggregation")Aggregation aggregation, @Param("product")Product product);
//产品不存在，添加数据
    void addprodect(@Param("aggregation")Aggregation aggregation,@Param("product")Product product);
    void addendprodect(Aggregation aggregation);
//    产品存在，加数量
    void editprodect(@Param("aggregation")Aggregation aggregation,@Param("product")Product product);
    //出库单
    void editreason(Aggregation aggregation);
//    若产品存在，判断销售数量与库存数量
    long totalCount(Product product);

    long numberCount(Aggregation aggregation);
//    若销售数量与库存数量相同
void delproduct(Product product);
//    库存充足，要减去库存字段相应数量
    void edittotal(@Param("aggregation")Aggregation aggregation,@Param("product")Product product);
//驳回原因
    void rejectreason(Aggregation aggregation);
}
